<!DOCTYPE html>
<html>
<head>
  <title></title>
  <script src="../resources/jquery.js"></script>
  <link rel="stylesheet" href="css/common.css">
  <link rel="stylesheet" href="css/main.css">
  <link rel="stylesheet" href="css/menu.css">
</head>
<body>
<?php
/**
 * Created by PhpStorm.
 * User: Aliaksei Lazerka
 * Date: 10/21/14
 * Time: 8:17 PM
 */
include_once("elems/menu.php");
include_once("functions/db_manipulate.php");
include_once("loginCheck.php");
$categoriesResult = getMainCategories();
$i = 0;
?>
<script>
  $('#directoryDiv').html('Изменения на главной странице')
</script>
<div class="bodyDiv">
  <form method="post" action="?chCtg" id="chCtgForm">
    <?php
    while ($category = mysql_fetch_assoc($categoriesResult)) {
      ?>
      <div class="mainDivItemEl">
        <textarea class="text" name="<?= $category['ID'] ?>"><?= $category['TITLE'] ?></textarea>
      </div>
    <?php
    }
    session_start();
    ?>
    <div class="buttonArea">
      <input type="button" value="Изменить" onclick="$('#chCtgForm').submit()">
    </div>
  </form>
</div>
</body>
</html>